#pragma once

#include <string>
#include <vector>
using namespace std;

class ProcTableEntry{
private:
	int entryNo;
	vector<int> nodeIDs;
	string name;
public:

	/** 
	 * Initialises a procedure entry of the ProcTable 
	 * with identifier name and index entryNo
	 * @param name the identifier of the procedure entry
	 * @param entryNo the index of the procedure entry
	 */
	ProcTableEntry(string name, int entryNo);
	
	/** 
	 * Adds an AST node ID to this procedure entry 
	 * @param nodeID the AST node ID to be added
	 * @return True if the AST node ID is successfully inserted. False if the AST node ID already exists.
	 */
	bool addNodeID(int nodeID);

	/** 
	 * Returns the list of AST nodes that contains the procedure in this entry
	 * @return A vector containing the AST node IDs where this procedure can be found
	 */
	vector<int> getNodeIDs();

	/** 
	 * Returns the name of this procedure
	 * @return a std::string containing the name of this procedure
	 */
	string getName();

	/** 
	 * Returns the index of this procedure
	 * @return an integer representing the index of this procedure
	 */
	int getEntryNo();
};
